(global.webpackJsonp = global.webpackJsonp || []).push([ [ "wjyk_recycle/pages/add-packing-station/add-packing-station" ], {
    "1e67": function(t, n, e) {},
    "363e": function(t, n, e) {
        function a() {
            this.$createElement, this._self._c;
        }
        var o = [];
        e.d(n, "b", function() {
            return a;
        }), e.d(n, "c", function() {
            return o;
        }), e.d(n, "a", function() {});
    },
    "50ba": function(t, n, e) {
        (function(t) {
            function n(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            e("8163"), n(e("66fd")), t(n(e("603e")).default);
        }).call(this, e("543d").createPage);
    },
    "603e": function(t, n, e) {
        e.r(n);
        var a, o = e("363e"), s = e("7719");
        for (a in s) "default" !== a && function(t) {
            e.d(n, t, function() {
                return s[t];
            });
        }(a);
        e("7ae8");
        var c = e("f0c5"), o = Object(c.a)(s.default, o.b, o.c, !1, null, null, null, !1, o.a, void 0);
        n.default = o.exports;
    },
    7719: function(t, n, e) {
        e.r(n);
        var a, o = e("d2bd"), s = e.n(o);
        for (a in o) "default" !== a && function(t) {
            e.d(n, t, function() {
                return o[t];
            });
        }(a);
        n.default = s.a;
    },
    "7ae8": function(t, n, e) {
        var a = e("1e67");
        e.n(a).a;
    },
    d2bd: function(t, e, a) {
        (function(c) {
            Object.defineProperty(e, "__esModule", {
                value: !0
            }), e.default = void 0;
            var t, r = (t = a("4795")) && t.__esModule ? t : {
                default: t
            };
            function i(t, n, e, a, o, s, c) {
                try {
                    var r = t[s](c), i = r.value;
                } catch (t) {
                    return e(t), 0;
                }
                r.done ? n(i) : Promise.resolve(i).then(a, o);
            }
            function u(r) {
                return function() {
                    var t = this, c = arguments;
                    return new Promise(function(n, e) {
                        var a = r.apply(t, c);
                        function o(t) {
                            i(a, n, e, o, s, "next", t);
                        }
                        function s(t) {
                            i(a, n, e, o, s, "throw", t);
                        }
                        o(void 0);
                    });
                };
            }
            var n = {
                data: function() {
                    return {
                        pic_url: this.$imgUrl,
                        name: "",
                        location: "",
                        lat: "",
                        lng: "",
                        user: "",
                        pass: "",
                        repass: "",
                        partnerid: ""
                    };
                },
                onLoad: function(t) {
                    this.partnerid = t.partnerid;
                },
                methods: {
                    chooseLocation: function() {
                        var n, e = this;
                        c.getLocation({
                            success: (n = u(r.default.mark(function t(n) {
                                return r.default.wrap(function(t) {
                                    for (;;) switch (t.prev = t.next) {
                                      case 0:
                                        console.log("ret", n), c.chooseLocation({
                                            success: function(t) {
                                                console.log("res", t), console.log("位置名称：" + t.name), console.log("详细地址：" + t.address), 
                                                console.log("纬度：" + t.latitude), console.log("经度：" + t.longitude), console.log("111111111111", e.lng, e.lat), 
                                                e.addressCheck(t.address, t.latitude, t.longitude);
                                            }
                                        });

                                      case 2:
                                      case "end":
                                        return t.stop();
                                    }
                                }, t);
                            })), function(t) {
                                return n.apply(this, arguments);
                            }),
                            fail: function(t) {
                                c.showModal({
                                    title: "温馨提示",
                                    content: "您已拒绝定位,请开启",
                                    confirmText: "去设置",
                                    success: function(t) {
                                        t.confirm && openSetting();
                                    }
                                });
                            }
                        });
                    },
                    addressCheck: function(e, a, o) {
                        var s = this;
                        return u(r.default.mark(function t() {
                            var n;
                            return r.default.wrap(function(t) {
                                for (;;) switch (t.prev = t.next) {
                                  case 0:
                                    return t.next = 2, s.$http({
                                        url: s.$api.addressCheck,
                                        data: {
                                            partnerid: s.partnerid,
                                            lng: o,
                                            lat: a
                                        }
                                    });

                                  case 2:
                                    n = t.sent, console.log("判断位置是否在区域范围内", n, n.data, e, a, o), 0 == n.errno && (n.data < 0 ? c.showModal({
                                        title: "温馨提示",
                                        content: "该区域暂未开通，敬请期待",
                                        confirmText: "去选择",
                                        success: function(t) {
                                            t.confirm && console.log("点击了去选择");
                                        }
                                    }) : (s.lng = o, s.lat = a, s.location = e, console.log("eeeeeeeeeeeeee", s.location, s.lat, s.lng)));

                                  case 5:
                                  case "end":
                                    return t.stop();
                                }
                            }, t);
                        }))();
                    },
                    save: function() {
                        var t = !0;
                        return this.name ? this.lat && this.lng && this.location ? this.user ? this.pass ? this.repass ? this.pass != this.repass ? (this.$sun.toast("密码不一致"), 
                        void (t = !1)) : void (t && (console.log("添加回收站"), this.packAddPack())) : (this.$sun.toast("请确认密码"), 
                        void (t = !1)) : (this.$sun.toast("请输入密码"), void (t = !1)) : (this.$sun.toast("请输入账号"), 
                        void (t = !1)) : (this.$sun.toast("请选择回收站地址"), void (t = !1)) : (this.$sun.toast("请输入回收站名称"), 
                        void (t = !1));
                    },
                    packAddPack: function() {
                        var e = this;
                        return u(r.default.mark(function t() {
                            var n;
                            return r.default.wrap(function(t) {
                                for (;;) switch (t.prev = t.next) {
                                  case 0:
                                    return e.$http({
                                        url: e.$api.packAddPack,
                                        data: {
                                            partnerid: e.partnerid,
                                            name: e.name,
                                            location: e.location,
                                            lat: e.lat,
                                            lng: e.lng,
                                            user: e.user,
                                            pass: e.pass,
                                            repass: e.repass
                                        }
                                    }).then(function(t) {
                                        console.log("res11111111", t), c.showModal({
                                            title: "提示",
                                            showCancel: !1,
                                            content: t.message,
                                            success: function(t) {
                                                if (t.confirm) c.navigateBack({
                                                    delta: 1
                                                }); else if (t.cancel) return;
                                            }
                                        });
                                    }).catch(function(t) {
                                        e.$sun.toast(t.data.message);
                                    }), t.abrupt("return");

                                  case 4:
                                    0 == (n = t.sent).errno && c.showModal({
                                        title: "提示",
                                        showCancel: !1,
                                        content: n.message,
                                        success: function(t) {
                                            if (t.confirm) c.navigateBack({
                                                delta: 1
                                            }); else if (t.cancel) return;
                                        }
                                    });

                                  case 6:
                                  case "end":
                                    return t.stop();
                                }
                            }, t);
                        }))();
                    }
                }
            };
            e.default = n;
        }).call(this, a("543d").default);
    }
}, [ [ "50ba", "common/runtime", "common/vendor" ] ] ]);